home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
man
/
cat.n
/
file.n
< prev
next >
Wrap
Text File
|
1995-07-25
|
9KB
|
199 lines
ffffiiiilllleeee((((nnnn)))) TTTTccccllll (((( )))) ffffiiiilllleeee((((nnnn))))
_________________________________________________________________
NNNNAAAAMMMMEEEE
file - Manipulate file names and attributes
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ffffiiiilllleeee _o_p_t_i_o_n _n_a_m_e ?_a_r_g _a_r_g ...?
_________________________________________________________________
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This command provides several operations on a file's name or
attributes. _N_a_m_e is the name of a file; if it starts with a
tilde, then tilde substitution is done before executing the
command (see the manual entry for TTTTccccllll____TTTTiiiillllddddeeeeSSSSuuuubbbbsssstttt for
details). _O_p_t_i_o_n indicates what to do with the file name.
Any unique abbreviation for _o_p_t_i_o_n is acceptable. The valid
options are:
ffffiiiilllleeee aaaattttiiiimmmmeeee _n_a_m_e
Returns a decimal string giving the time at which file
_n_a_m_e was last accessed. The time is measured in the
standard POSIX fashion as seconds from a fixed starting
time (often January 1, 1970). If the file doesn't
exist or its access time cannot be queried then an
error is generated.
ffffiiiilllleeee ddddiiiirrrrnnnnaaaammmmeeee _n_a_m_e
Returns all of the characters in _n_a_m_e up to but not
including the last slash character. If there are no
slashes in _n_a_m_e then returns ``.''. If the last slash
in _n_a_m_e is its first character, then return ``/''.
ffffiiiilllleeee eeeexxxxeeeeccccuuuuttttaaaabbbblllleeee _n_a_m_e
Returns 1111 if file _n_a_m_e is executable by the current
user, 0000 otherwise.
ffffiiiilllleeee eeeexxxxiiiissssttttssss _n_a_m_e
Returns 1111 if file _n_a_m_e exists and the current user has
search privileges for the directories leading to it, 0000
otherwise.
ffffiiiilllleeee eeeexxxxtttteeeennnnssssiiiioooonnnn _n_a_m_e
Returns all of the characters in _n_a_m_e after and
including the last dot in _n_a_m_e. If there is no dot in
_n_a_m_e then returns the empty string.
ffffiiiilllleeee iiiissssddddiiiirrrreeeeccccttttoooorrrryyyy _n_a_m_e
Returns 1111 if file _n_a_m_e is a directory, 0000 otherwise.
ffffiiiilllleeee iiiissssffffiiiilllleeee _n_a_m_e
Returns 1111 if file _n_a_m_e is a regular file, 0000 otherwise.
Page 1 (printed 7/17/95)
ffffiiiilllleeee((((nnnn)))) TTTTccccllll (((( )))) ffffiiiilllleeee((((nnnn))))
ffffiiiilllleeee llllssssttttaaaatttt _n_a_m_e _v_a_r_N_a_m_e
Same as ssssttttaaaatttt option (see below) except uses the _l_s_t_a_t
kernel call instead of _s_t_a_t. This means that if _n_a_m_e
refers to a symbolic link the information returned in
_v_a_r_N_a_m_e is for the link rather than the file it refers
to. On systems that don't support symbolic links this
option behaves exactly the same as the ssssttttaaaatttt option.
ffffiiiilllleeee mmmmttttiiiimmmmeeee _n_a_m_e
Returns a decimal string giving the time at which file
_n_a_m_e was last modified. The time is measured in the
standard POSIX fashion as seconds from a fixed starting
time (often January 1, 1970). If the file doesn't
exist or its modified time cannot be queried then an
error is generated.
ffffiiiilllleeee oooowwwwnnnneeeedddd _n_a_m_e
Returns 1111 if file _n_a_m_e is owned by the current user, 0000
otherwise.
ffffiiiilllleeee rrrreeeeaaaaddddaaaabbbblllleeee _n_a_m_e
Returns 1111 if file _n_a_m_e is readable by the current user,
0000 otherwise.
ffffiiiilllleeee rrrreeeeaaaaddddlllliiiinnnnkkkk _n_a_m_e
Returns the value of the symbolic link given by _n_a_m_e
(i.e. the name of the file it points to). If _n_a_m_e
isn't a symbolic link or its value cannot be read, then
an error is returned. On systems that don't support
symbolic links this option is undefined.
ffffiiiilllleeee rrrroooooooottttnnnnaaaammmmeeee _n_a_m_e
Returns all of the characters in _n_a_m_e up to but not
including the last ``.'' character in the name. If
_n_a_m_e doesn't contain a dot, then returns _n_a_m_e.
ffffiiiilllleeee ssssiiiizzzzeeee _n_a_m_e
Returns a decimal string giving the size of file _n_a_m_e
in bytes. If the file doesn't exist or its size cannot
be queried then an error is generated.
ffffiiiilllleeee ssssttttaaaatttt _n_a_m_e _v_a_r_N_a_m_e
Invokes the ssssttttaaaatttt kernel call on _n_a_m_e, and uses the
variable given by _v_a_r_N_a_m_e to hold information returned
from the kernel call. _V_a_r_N_a_m_e is treated as an array
variable, and the following elements of that variable
are set: aaaattttiiiimmmmeeee, ccccttttiiiimmmmeeee, ddddeeeevvvv, ggggiiiidddd, iiiinnnnoooo, mmmmooooddddeeee, mmmmttttiiiimmmmeeee,
nnnnlllliiiinnnnkkkk, ssssiiiizzzzeeee, ttttyyyyppppeeee, uuuuiiiidddd. Each element except ttttyyyyppppeeee is a
decimal string with the value of the corresponding
field from the ssssttttaaaatttt return structure; see the manual
entry for ssssttttaaaatttt for details on the meanings of the
values. The ttttyyyyppppeeee element gives the type of the file in
Page 2 (printed 7/17/95)
ffffiiiilllleeee((((nnnn)))) TTTTccccllll (((( )))) ffffiiiilllleeee((((nnnn))))
the same form returned by the command ffffiiiilllleeee ttttyyyyppppeeee. This
command returns an empty string.
ffffiiiilllleeee ttttaaaaiiiillll _n_a_m_e
Returns all of the characters in _n_a_m_e after the last
slash. If _n_a_m_e contains no slashes then returns _n_a_m_e.
ffffiiiilllleeee ttttyyyyppppeeee _n_a_m_e
Returns a string giving the type of file _n_a_m_e, which
will be one of ffffiiiilllleeee, ddddiiiirrrreeeeccccttttoooorrrryyyy, cccchhhhaaaarrrraaaacccctttteeeerrrrSSSSppppeeeecccciiiiaaaallll,
bbbblllloooocccckkkkSSSSppppeeeecccciiiiaaaallll, ffffiiiiffffoooo, lllliiiinnnnkkkk, or ssssoooocccckkkkeeeetttt.
ffffiiiilllleeee wwwwrrrriiiittttaaaabbbblllleeee _n_a_m_e
Returns 1111 if file _n_a_m_e is writable by the current user,
0000 otherwise.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
attributes, directory, file, name, stat
Page 3 (printed 7/17/95)